package com.example.eurekaconsume;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.ribbon.proxy.annotation.Hystrix;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.net.URI;

@RestController
@RequestMapping("/consume")
public class ConsumeController {

    @Autowired
    private ConsumeService consumeService;

    @RequestMapping("/index")
    public String index(){
        System.out.println("from ribbon consume");
        return consumeService.index();
    }

    @RequestMapping("/uri")
    public String uri(){
        return consumeService.uri();
    }
}
